# Main makefile
flags= -Wall -g
libs=`allegro-config --cflags --libs` 
cc=g++ $(flags) $(libs)


PROG = COWPLOSION
TRGTS = COMMON MENU GAME
OBJS = common/IScreen.o common/ScreenManager.o common/GameScreen.o \
	menu/MenuItem.o menu/Menu.o menu/MainMenu.o \
	common/CommonResource.o game/entities/Entity.o \
	game/entities/Rock.o \
	game/managers/DrawManager.o game/managers/SubManager.o \
	game/managers/StaticsManager.o\
    game/entities/RocketDude.o game/entities/Character.o
	

$(PROG): $(TRGTS)
	$(cc) -o cowplosion.bin $(OBJS) main.cpp

COMMON:
	cd ./common ; make COMMON	

MENU:
	cd ./menu ; make MENU

GAME:
	cd ./game ; make GAME

clean:
	rm -f *.o *.bin
	cd ./common ; make clean
	cd ./menu ; make clean
	cd ./game ; make clean
	cd ./tests ; make clean
